echo off
cls
echo -- BACKUP DATABASE --
set /p DATABASENAME=Enter database name:
set BACKUPFILENAME=%CD%\%DATABASENAME%.bak
set SERVERNAME=.
echo.
sqlcmd -E -S %SERVERNAME% -d master -Q "BACKUP DATABASE [%DATABASENAME%] TO DISK = N'%BACKUPFILENAME%' WITH INIT , NOUNLOAD , NAME = N'%DATABASENAME% backup', NOSKIP , STATS = 10, NOFORMAT"
echo.
pause